package com.smf.lsc.authorization.security.util;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

/**
 * json工具类
 * Created on 2021/11/19.
 *
 * @author ln
 * @since 1.0
 */

public class JsonUtil {
    public static String toJson(Object object){
        GsonBuilder gsonBuilder = new GsonBuilder();
        gsonBuilder.setPrettyPrinting();
        Gson gson = gsonBuilder.create();
        return gson.toJson(object);
    }
}